package com.sxhuayuan.parking.plugin.partnerpay;

import com.sxhuayuan.parking.config.PartnerpayScene;
import com.sxhuayuan.parking.config.Platform;
import com.sxhuayuan.parking.entity.ParkingIn;
import com.sxhuayuan.parking.entity.ParkingLot;
import com.sxhuayuan.parking.plugin.partnerpay.req.PayApplyReq;
import com.sxhuayuan.parking.plugin.partnerpay.result.JumpToSignPageResult;
import com.sxhuayuan.parking.plugin.partnerpay.result.NoticeInResult;
import com.sxhuayuan.parking.plugin.partnerpay.result.PayApplyResult;
import com.sxhuayuan.parking.plugin.partnerpay.result.QueryStateResult;

/**
 * 官方委托代扣统一接口，不同的平台的api需要实现此接口
 */
public abstract class PartnerpayApiService implements Comparable<PartnerpayApiService> {

	public abstract boolean isEnabled();
	
	public abstract Platform getPlatform();

	/**
	 * 
	 * 
	 * @param lot
	 * @param openid
	 * @param subOpenid
	 * @param carPlate
	 */
	public abstract QueryStateResult queryUserState(ParkingLot lot, String openid, String subOpenid, String carPlate, String jumpScene);

	/**
	 * 通知平台车辆入场
	 * 
	 * @param lot
	 * @param carPlate
	 * @return
	 */
	public abstract NoticeInResult noticeIn(ParkingIn in);

	/**
	 * 通知平台扣款
	 * 
	 * @param in
	 * @param order
	 * @param scene
	 * @return
	 */
	public abstract PayApplyResult payApply(PayApplyReq req);

	/**
	 * 跳转到小程序签约页面
	 * 
	 * @param scene
	 * @param lot
	 * @param path
	 * @param openid
	 * @param subOpenid
	 * @param carPlate
	 * @param channelType
	 *            车道
	 * @param materialInfo
	 *            物料信息
	 * 
	 * @return
	 */
	public abstract JumpToSignPageResult jumpToSignPage(PartnerpayScene scene, ParkingLot lot, String path, String openid, String subOpenid, String carPlate, String channelType,
			String materialInfo, String client);

}
